package jsyf.oa.entity.forms;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Created by 92852 on 2018/6/22.
 */
@Entity
@Table(name = "T_FORMS_COMPONENTS", schema = "oa", catalog = "")
public class ComponentsEntity extends BaseEntity implements Serializable {
    private String name;
    private String type;
    private String imgUrl;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    @Override
    public String getTableName() {
        return "T_FORMS_COMPONENTS";
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("NAME", getName());
        obj.put("TYPE", getType());
        obj.put("IMG_URL", getImgUrl());
        return obj;
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("NAME", "name");
        obj.put("TYPE", "type");
        obj.put("IMG_URL", "imgUrl");
        return obj;
    }


}
